package br.ufpb.di.ppgi.persistencia.query;

import javax.persistence.EntityManager;

import br.ufpb.di.ppgi.persistencia.domainstore.DomainStore;
import br.ufpb.di.ppgi.persistencia.iquery.IQuery;

public abstract class AbstractJPAQuery implements IQuery{
	
	private final DomainStore domainStore;
	private final EntityManager manager;
	
	public AbstractJPAQuery(DomainStore domainStore) {
		this.domainStore = domainStore;
		this.manager = (EntityManager) domainStore.getDelegate();
	}
	
	protected EntityManager getManager() {
		return manager;
	}
	
	protected DomainStore getDomainStore() {
		return domainStore;
	}
}
